Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 3 - Endpoints / Endpoints Reference
Functions / Functions for Connection-Oriented Transaction-Based Endpoints


OTCancelRequest

Cancels an outstanding request as defined by a call to the OTSndRequest function.

C INTERFACE
OSStatus OTCancelRequest(EndpointRef ref, OTSequence seq);
C++ INTERFACE
OSStatus Tendpoint::CancelRequest(OTSequence seq);
PARAMETERS
ref
The endpoint reference of the endpoint that has sent the request being cancelled.
seq
A long, specifying the transaction ID of the request being canceled. You must specify the same value that you used for
the sequence field of the req parameter you passed to the OTSndRequest function. If you specify 0 for this parameter, the provider cancels all outstanding requests. If you specify an invalid sequence number, the provider does not do anything.
DESCRIPTION
When you make a call to the OTSndRequest function, the endpoint provider allocates memory for internal buffers for this transaction. If you are no longer interested in the transaction, you must tell the endpoint provider by calling the OTCancelRequest function. Explicitly canceling a request allows the provider to free up the memory associated with a transaction request.

If the function completes successfully, it returns the kOTNoErr result; it does
not return any other kind of acknowledgment. It is your responsibility to deallocate memory that you have reserved for the address, options, and data buffers associated with the canceled function.

Use OTCancelRequest to cancel an outgoing request; use OTCancelReply to cancel an incoming request.

VALID STATES
T_IDLE

SEE ALSO
You use the OTSndRequest function (page 3-137) to send a request.

You use the OTCancelReply function (described next) to cancel an incoming request.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996